<SCRIPT src="/js/edit_artist.js" type="text/javascript"></SCRIPT>
<FORM method="post" enctype="multipart/form-data" onsubmit="return checkForm();" action="/?cat=commit_artist&update=1">

    <input type="hidden" value="<!--TPL:$artist->id-->" name="artist_id">
    <TABLE class="commit_table" width="50%" align="center" cellspacing="5" cellpadding="0">
	<TR>
	    <TD width="100%" class="commit_caption">
		<TABLE border="0">
		    <TR>
			<TD  nowrap align="left" width="100%">
			    <!--TPL:"Edit artist"|gettext-->
			</TD>
		    </TR>
		</TABLE>
	    </TD>
	</TR>
	<TR>
	    <TD width="100%" class="commit_desc" align="center">
		<!--TPL:"Please don't abuse."|gettext-->
	    </TD>
	</TR>
	<TR>
	    <TD width="100%">
                <TABLE width="85%" border="0" align="center" cellspacing="0" cellpadding="5">
                    <TR>
                        <TD class="commit_label" nowrap align="right" width="35%">
                                <!--TPL:"Artist name"|gettext-->:
                        </TD>
                        <TD nowrap align="left" height="32" width="65%">
                            <input name="artistname" id="artistname" class="flat" type="text" size="46" maxlength="128" value="<!--TPL:$artist->name-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <small><!--TPL:"Old name"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                                <input name="old_artistname" id="old_artistname" class="flat" type="text" size="46" maxlength="128" value="<!--TPL:$artist->old_name-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <small><!--TPL:"Country"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                                <input name="country" id="country" class="flat" type="text" size="46" maxlength="64" value="<!--TPL:$artist->country-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Year formed"|gettext-->:
                        </TD>
                        <TD nowrap align="left" height="32">
                                <input name="year_formed" id="year_formed" class="flat" type="text" size="2" maxlength="4" value="<!--TPL:$artist->year_formed-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Year disbanded"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                                <input name="year_disbanded" id="year_disbanded" class="flat" type="text" size="2" maxlength="4" value="<!--TPL:$artist->year_disbanded-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <small><!--TPL:"Homepage"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                                <input name="homepage" id="homepage" class="flat" type="text" size="46" maxlength="128" value="<!--TPL:$artist->homepage-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <small><!--TPL:"Myspace"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                                <input name="myspace" id="myspace" class="flat" type="text" size="46" maxlength="128" value="<!--TPL:$artist->myspace-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <small><!--TPL:"Picture"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                            <!--TPL:if $artist->has_picture == 't' -->
                            <input type="hidden" name="has_picture" value="1">
                            <!--TPL:/if-->
                                <input type="file" id="picture" name="picture" size="38">
                                <br>
                                <input class="flat" type="text" id="picture_url" name="picture_url" size="38">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Labels"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                            <div id="labels">
                                <!--TPL:foreach name=outer from=$labels item=item-->
                                <span id="label<!--TPL:$item.id-->">
                                    <input id="input_label_year<!--TPL:$item.id-->" type="text" class="flat" size="2" name="label_year<!--TPL:$item.id-->" value="<!--TPL:$item.year-->">
                                    <input id="input_label<!--TPL:$item.id-->" type="text" class="flat" size="38" maxlength="128" name="label<!--TPL:$item.id-->" value="<!--TPL:$item.name-->">
                                    <small>
                                        <a href="#" class="button" onclick="removeLabel('<!--TPL:$item.id-->'); return false;"><!--TPL:"remove"|gettext--></a>
                                    </small>
                                    <br><br>
                                </span>
                                <!--TPL:/foreach-->
                            </div>
                        </TD>
                    </TR>

                    <TR>
                        <TD nowrap align="right">

                        </TD>
                        <TD nowrap align="left">
                                <a class="button" href="#" onclick="addLabel(); return false;">&nbsp;<!--TPL:"Add label"|gettext--></a><br>
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Releases"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                            <div id="releases">
                                <!--TPL:foreach name=outer from=$releases item=item-->
                                <!--TPL:if !empty($item.year_finished)-->
                                <span id="release<!--TPL:$item.id-->">
                                    <input id="input_release_year<!--TPL:$item.id-->" type="text" class="flat" size="2" name="release_year<!--TPL:$item.id-->" value="<!--TPL:$item.year_finished-->">
                                    <input id="input_release<!--TPL:$item.id-->" type="text" class="flat" size="38" maxlength="128" name="release<!--TPL:$item.id-->" value="<!--TPL:$item.name-->">
                                    <small>
                                        <a href="#" class="button" onclick="removeRelease('<!--TPL:$item.id-->'); return false;"><!--TPL:"remove"|gettext--></a>
                                    </small>
                                    <br><br>
                                </span>
                                <!--TPL:/if-->
                                <!--TPL:/foreach-->
                            </div>
                        </TD>
                    </TR>

                    <TR>
                        <TD nowrap align="right">

                        </TD>
                        <TD nowrap align="left">
                                <a class="button" href="#" onclick="addRelease(); return false;">&nbsp;<!--TPL:"Add release"|gettext--></a><br>
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Tags"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                            <div id="tags">
                                <!--TPL:foreach name=outer from=$tags item=item-->
                                <span id="tag<!--TPL:$item.id-->">
                                    <input id="input_tag<!--TPL:$item.id-->" type="text" class="flat" size="46" maxlength="128" name="tag<!--TPL:$item.id-->" value="<!--TPL:$item.name-->">
                                    <small>
                                        <a href="#" class="button" onclick="removeTag('<!--TPL:$item.id-->'); return false;"><!--TPL:"remove"|gettext--></a>
                                    </small>
                                    <br><br>
                                </span>
                                <!--TPL:/foreach-->
                            </div>
                        </TD>
                    </TR>

                    <TR>
                        <TD nowrap align="right">

                        </TD>
                        <TD nowrap align="left">
                                <a class="button" href="#" onclick="addTag(); return false;">&nbsp;<!--TPL:"Add tag"|gettext--></a><br>
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <!--TPL:"Members"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                            <div id="members">
                                <!--TPL:foreach name=outer from=$members item=item-->
                                <span id="member<!--TPL:$item.id-->">
                                    <input id="input_member_year_started<!--TPL:$item.id-->" type="text" class="flat" size="2" name="member_year_started<!--TPL:$item.id-->" value="<!--TPL:$item.year_started-->">
                                    <input id="input_member_year_finished<!--TPL:$item.id-->" type="text" class="flat" size="2" name="member_year_finished<!--TPL:$item.id-->" value="<!--TPL:$item.year_finished-->">
                                    <input id="input_member<!--TPL:$item.id-->" type="text" class="flat" size="30" maxlength="128" name="member<!--TPL:$item.id-->" value="<!--TPL:$item.name-->">
                                    <small>
                                        <a href="#" class="button" onclick="removeMember('<!--TPL:$item.id-->'); return false;"><!--TPL:"remove"|gettext--></a>
                                    </small>
                                    <br><br>
                                </span>
                                <!--TPL:/foreach-->
                            </div>
                        </TD>
                    </TR>

                    <TR>
                        <TD nowrap align="right">

                        </TD>
                        <TD nowrap align="left">
                                <a class="button" href="#" onclick="addMember(); return false;">&nbsp;<!--TPL:"Add member"|gettext--></a><br>
                        </TD>
                    </TR>

                    <TR>
                        <TD colspan="2" align="left">
                            <div align="center">
                                <input type="submit" value="<!--TPL:"Commit changes"|gettext-->">
                            </div>
                        </TD>
                    </TR>


                </TABLE>
            </TD>
          </TR>
    </TABLE>
</FORM>